<%--
  Created by IntelliJ IDEA.
  User: Cool
  Date: 2023/10/24
  Time: 16:19
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>成绩等级</title>
</head>
<body>
<c:set var="score" value="${param.score}" />
<c:set var="grade" value="不合法" />

<c:choose>
  <c:when test="${score < 60}">
    <c:set var="grade" value="不及格" />
  </c:when>
  <c:when test="${score < 70}">
    <c:set var="grade" value="及格" />
  </c:when>
  <c:when test="${score < 80}">
    <c:set var="grade" value="中等" />
  </c:when>
  <c:when test="${score < 90}">
    <c:set var="grade" value="良好" />
  </c:when>
  <c:when test="${score >= 90}">
    <c:set var="grade" value="优秀" />
  </c:when>
</c:choose>

<p>成绩等级： <c:out value="${grade}" /></p>
</body>
</html>

